export default function getWebsitePath(pathDepth = 1, url) {
    /* eslint-disable */
    let pathnameArray = url ? url : window.location.pathname;
    /* eslint-disable */
    let pathname = '';
    if (pathDepth === 0) {
      return pathnameArray;
    }
    pathnameArray = pathnameArray.split('/');
    const startNum = 1;
    for (let i = startNum; i < startNum + pathDepth; i += 1) {
      pathname += `/${pathnameArray[i]}`;
    }
    return pathname;
  }